# git://git.busybox.net/busybox
# https://git.busybox.net/busybox

BB_GIT_URL				?= git://git.busybox.net/busybox
BB_SITE 				?= https://www.busybox.net/downloads
BB_BRANCH				?= master

BB_VERSION 				?= 1.36.0
BB_BASE					?= busybox-$(BB_VERSION)
BB_PKG 					?= $(BB_BASE).tar.bz2
BB_SAVECONF				?= $(BB_CONFIG)


KL_ARGS_bb				?= root=/dev/vda rw init=/linuxrc

RFS_IMG_DIR_bb			= $(EEL_OUT_DIR)/$(ARCH)/$(BB_VER_DIR)
RFS_IMG_BASE_bb			= rootfs.$(BB_CONFIG)
RFS_IMAGE_bb			= $(RFS_IMG_DIR_bb)/$(RFS_IMG_BASE_bb).$(RFS_TYPE)


BB_SRC_DIR				?= rootfs
BB_GIT_DIR				?= $(BB_SRC_DIR)/busybox-repo
BB_VER_DIR 				?= $(BB_SRC_DIR)/$(BB_BASE)

S_BB_DIR				= $(EEL_SRC_DIR)/$(BB_VER_DIR)
G_BB_DIR				= $(EEL_SRC_DIR)/$(BB_GIT_DIR)
O_BB_DIR				= $(EEL_OUT_DIR)/$(ARCH)/$(BB_VER_DIR)/$(BB_CONFIG)
ifneq ($(S_BB_DIR),$(wildcard $(S_BB_DIR)))
S_BB_DIR				= $(G_BB_DIR)
endif

#### RootFS ####
RFS_DEP_bb				= $(O_BB_DIR)/.build_done.busybox
RFS_DEP_br				=
RFS_DEP_bs				=

ifeq ($(ARM_TEE),1)
RFS_DEP_bb				+= $(RFS_TEE_DEPS)
RFS_DEP_br				+= $(RFS_TEE_DEPS)
endif
